﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="FoodStyleManagement.aspx.cs" Inherits="Admin_FoodStyleManagement" Title="Food Style Management" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
    <telerik:RadGrid ID="uxFoodStyle" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        GridLines="None" Skin="Office2007" OnNeedDataSource="uxFoodStyle_NeedDataSource"
        OnCancelCommand="uxFoodStyle_CancelCommand" OnDeleteCommand="uxFoodStyle_DeleteCommand"
        OnInsertCommand="uxFoodStyle_InsertCommand" 
        OnUpdateCommand="uxFoodStyle_UpdateCommand">
        <HeaderContextMenu Skin="Office2007" EnableTheming="True">
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        </HeaderContextMenu>
        <MasterTableView DataKeyNames="FoodStyleID" CommandItemDisplay="TopAndBottom" ClientDataKeyNames="FoodStyleID">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridEditCommandColumn>
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="FoodStyleName" HeaderText="Food Style Name" UniqueName="Food Style Name">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete"
                    ConfirmDialogType="RadWindow" ConfirmText="Are you sure you would like to delete this?"
                    ConfirmTitle="Delete">
                </telerik:GridButtonColumn>
                <telerik:GridBoundColumn DataField="FoodStyleID" HeaderText="FoodStyleID" UniqueName="FoodStyleID"
                    Visible="False">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings EditFormType="Template">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
                <FormTemplate>
                    <table>
                        <tr>
                            <td>
                                <b>Food Style Name</b>
                            </td>
                            <td>
                                <asp:TextBox ID="txtFoodStyleName" runat="server" Text='<%#Eval("FoodStyleName") %>'
                                    Width="400px" Height="20px" Font-Bold="true"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter Food Style Name"
                                    ControlToValidate="txtFoodStyleName"></asp:RequiredFieldValidator>                                
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <p /><p /><asp:Label ID="lbError" runat="server" Visible="false" ForeColor="Red">FoodStyleName Đã Có!!!!</asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="left" colspan="2">
                                <asp:Button ID="btnUpdate" runat="server" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />&nbsp;
                                <asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="False"
                                    CommandName="Cancel" />
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <FilterMenu Skin="Office2007" EnableTheming="True">
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        </FilterMenu>
    </telerik:RadGrid>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Height="75px"
        Width="75px">
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'
            style="border: 0px;" />
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="uxFoodStyle">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="uxFoodStyle" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadWindowManager ID="Singleton" Width="650" Height="430" VisibleStatusbar="false"
        Behaviors="Close, Move, Resize" runat="server" Skin="Office2007">
    </telerik:RadWindowManager>
</asp:Content>
